package com.xgk.boot.module.core.controller.admin.truck.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import com.xgk.boot.module.core.dal.entity.user.AdminUserDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.Instant;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 操作日志 Response VO")
@Data
@ExcelIgnoreUnannotated
public class OrderLogRespVO implements VO {

    @Schema(description = "日志编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @ExcelProperty("日志编号")
    private Long id;
    /** 操作类型：add/edit/submit/change/out/other */
    private String opType;

    /** 订单ID */
    private Long orderId;

    /** 订单编号 */
    private String orderCode;

    /** 变更类型：0-状态 1-内容 */
    private Integer olType;

    /** 变更前状态 */
    private Integer orderStatusFrom;

    /** 变更后状态 */
    private Integer orderStatusTo;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @Trans(type = TransType.SIMPLE, target = AdminUserDO.class, fields = "nickname", ref = "userName")
    private Long userId;
    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("操作人")
    private String userName;

    /** 操作IP */
    private String olIp;

    /** 操作备注 */
    private String olComments;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private Instant createTime;

}
